const mysql=require('mysql')
const client=mysql.createConnection({
  host:'localhost',
  user:'root',
  password:'',
  database:"vue-ego"
})
function sqlFun(sql,arr,callback){
  client.query(sql,arr,function(err,result){
    if(err){
      console.log('数据库语句错误');
      return
    }
    callback(result)
  })
}
module.exports=sqlFun